$(document).ready(function () {

    var ani = function (ele) {
        this.ele = $(ele);
        this.start = function () {
            this.ele.toggleClass("show");
        }
    };

    var ani = new ani('.skill');

    $('#fullpage').fullpage({
        'navigation': true,
        sectionsColor: ['#F27E48', '#E5F4BA', '#346AAA', '#03a6ff', '#CCF756', '#03a6ff', '#F27E48'],
        afterLoad: function (anchorLink, index) {
            if (index === 3) {
                ani.start()
            }

        },
        onLeave: function (index, direction) {
            if (index === 3) {
                ani.start()
            }
        }
    });
});
